function [results, param] = postprocess(results, param)
    if ~param.use_mapping || (length(results) < 1)
        return;
    end
    
    if isfield(param,'jmp')
        jmp = param.jmp;
    else
        jmp = size(results{1},2);
    end
    
    if mod(size(results{1},2), jmp) ~= 0
        error('length of results must be multiple times of param.jmp');
    end
    pass = size(results{1},2) / jmp
    
    if ~isfield(param, 'mapping')
        hz = sum(results{1});
        for z = 2:length(results)
            hz = hz + sum(results{z});
        end
        
        param.mapping = zeros(1, length(results));
        for k = 1:pass
            h = hz((k-1) * jmp+1:k*jmp);
            h = h / sum(h);
            v = sort(h, 'descend');
            i = 0;
            s = 0;
            while (i < length(h)) && (s < param.ratio)
                i = i + 1;
                s = s + v(i);
            end
            t = v(i);
            param.mapping((k-1) * jmp+1:k*jmp) = (h >= t);
        end
        param.mapping = logical(param.mapping);
    end
    
    for z = 1:length(results)
        r = results{z};
        results{z} = r(:, param.mapping);
    end
end